<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <!-- <meta http-equiv="refresh" content="10"> -->
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script src="./MyPromise.js"></script>

  <script>
    let p = new NewP((resolve, reject) => {
      setTimeout(() => {
        resolve('haha')
      },1000)
      
      // reject('wuwu')
    }).then(data => {
      // console.log(a);
      console.log(data);
    }, err => {
      // console.log(s);
      console.log(err);
    }).then(data => {
      console.log(data);
    }, err => {
      console.log(err);
    })
    console.log('我的名字');
  </script>
</body>
</html>